import http from '@/utils/http'
import { useAuthStore } from '@/store/auth'

const userInfo = useAuthStore().userInfo
// 区域字典
export const getAreaDictList = () => {
  return http.get('/dict/areaList', { params: { customerNo: userInfo.customerNo } })
}

// 传感器类型字典
export const getMineralDictList = () => {
  return http.get('/dict/sensorTypeDict', { params: { customerNo: userInfo.customerNo } })
}

// 传感器状态字典
export const getSensorStatusDict = () => {
  return http.get('/dict/sensorStatusDict', { params: { customerNo: userInfo.customerNo } })
}

// 告警源字典
export const getAlarmSourceDict = () => {
  return http.get('/dict/alarmSourceDict')
}

// 告警类型字典
export const getAlarmTypeDict = (alarmSource: string) => {
  return http.get('/dict/alarmTypeDict', { params: { alarmSource } })
}

